package com.cyq.day14.game;

public class Game {
    Hero hero1 = new Hero(100, 20, 10, "伊泽瑞尔");
    Monster monster1 = new Monster(100, 15, 5, "软泥怪");

    public void start() {
        while (hero1.hp > 0 && monster1.hp > 0) {
            hero1.Fight(monster1);
            monster1.fight(hero1);
            if (hero1.hp <= 0) {
                System.out.println("英雄没了");
                return;
            }
            if (monster1.hp <= 0) {
                System.out.println("胜利");
                return;
            }
        }
    }
}
